package com.burpee.web;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileUpload {
	
	public boolean saveFile(String filePath, 
			String saveFileName,
			byte[] data) {

        try{
        	
             File file = new File(filePath + saveFileName);
             
             FileOutputStream fileOutputStream = new FileOutputStream(file);
             fileOutputStream.write(data);
             fileOutputStream.close();
             
             return true;
        }catch(IOException ie){
            System.err.println("File writing error! ");
        }
        
        return false;
	}


}
